#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include "../../mylib.h"

struct tm *getCurrentTime();
struct tm *getUTCTime();

void printTime()
{
  struct tm t;
  time_t t_of_day;

  t.tm_year = 2000 - 1900;
  t.tm_mon = 0;
  t.tm_mday = 3;
  t.tm_hour = 0;  /* hour, min, sec don't matter */
  t.tm_min = 0;   /* as long as they don't cause a */
  t.tm_sec = 1;   /* new day to occur */
  t.tm_isdst = 0;

  t_of_day = mktime(&t);
  printf(ctime(&t_of_day));
}

int TimeMain(int argc,char **argv)
{
  struct tm *tminfo;
  time_t timeOfDay;
  //  tminfo = getCurrentTime();
  printf ( "Current date and time are: %s", asctime (tminfo) );
  //  tminfo = getUTCTime();
  printf ( "UTC date and time are: %s", asctime (tminfo) );

  //timeOfDay = createNewTime(2011 - 1900,5,4,3,2,1,0);
  printf(ctime(&timeOfDay));
  return 0;
}

void add()
{
  int i;
  long j = 0;
  for(i = 0;i<100000000;i++)
    {
      j += i; 
    }
  printf("%d\n",j);
}

int main(int argc,char **argv)
{

  GetStartTime();
  //  sleep(2);
  add();
  GetEndTime();

  printf("%f\n",Interval());
  //  printf("%d\n",clock());
  
  return 0;
}
